cap confirm file "$data_out/PULHES.dta" 
if _rc!=0 { 
do "$Outcomes/PULHES.do"
}
else use "$data_out/PULHES.dta", clear 

label var ed_prescription "Prescription in ED"
label var physical_Z "Fitness Capability Z-Score"
label var psych_Z "Psychological Capability Z-Score"

estimates clear

foreach outcome in   physical_Z psych_Z {
eststo `outcome'_C:	ivreghdfe `outcome' $spec1
estadd ysumm, replace

eststo `outcome'_Q:	ivreghdfe `outcome' $spec2
estadd ysumm, replace
}



	//word
esttab physical_Z_C psych_Z_C  using "pulhes.rtf" , replace label se star(* 0.10 ** 0.05 *** 0.01) ///
	b(4) se(4) stats(ymean N , fmt(a2 %-9.0fc) label("Sample Mean" "Observations")) ///
		keep(ed_prescription) title(IV Results for Health Capability Status - Prescribing Rate Instrument)
		


esttab physical_Z_Q psych_Z_Q  using "pulhes.rtf" , append label se star(* 0.10 ** 0.05 *** 0.01) ///
	b(4) se(4) stats(ymean N , fmt(a2 %-9.0fc)) nonotes nomtitles	nonum keep(ed_prescription)
	



